Distance Function

Euclidian distance

Cosine similarity

= a measure of similarity of the directions of two vectors.

s(xi,xk):=cos((xi,xk))

Other functions